Open
Conversation
Replace gopherwasm/js with syscall/js Use gopherjs 1.12-2's support for syscall/js to make the WASM code work in GopherJS as well.
Contributor
|
@jancona I've integrated WASM compilation into nhooyr.io/websocket v1.6.0, I think you'll find it useful. |
Author
|
Thanks @nhooyr I'll take a look. |
Author
|
This PR is currently broken on Go 1.13 because of golang/go#32402. I can put together a fix, but I won't bother if there's no interest in merging this. Could someone associated with the project (@dmitshur or others) comment on whether this is worth pursuing? |
|
@johanbrandhorst What're your thoughts on this? |
Contributor
|
I think it's worthwhile getting this in but I don't have merge access either unfortunately :(. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is based on @nightexcessive's
wasmbranch (see #27). It:gopherwasm/jswith Go 1.12syscall/jssyscall/jsto make the WASM code work in GopherJS as wellBased on the discussions in #27, I made the main
websocketpackage no longer depend onwebsocketjs. (I moved the necessary code intowebsocket.)websocketjsis kept unchanged for backwards compatibility, but is GopherJS-only. The end result should be that no breaking changes are made to the either package, but per @dmitshur's suggestion, the low-levelwebsocketjsis not provided for WASM.Let me know if you'd prefer that I make the PR against the
wasmbranch instead ofmaster. I'm also happy to cleanup the commit history if you think that's appropriate.